all: test/Test.so

test/Test.so: Makefile os/so.o test/test.d ruby/c/*.d
	gdc -o test/Test.so test/test.d os/so.o ruby/c/*.d -shared -fPIC -lruby

os/so.o: Makefile os/so.c
	gcc -o os/so.o -c os/so.c -I /usr/lib/ruby/1.8/i686-linux 
	
clean:
	-rm -rf test/Test.so os/so.o
